<template>
	<view class="main">
		<view class="container">
			<view class="list">
				<view class="item">
					<view class="item-l">
						<span class="num">320</span>
						<span class="unit">Pa</span>
					</view>
					<view class="item-time">2025.01.05  15:06:05</view>
				</view>
				<view class="item">
					<view class="item-l">
						<span class="num">320</span>
						<span class="unit">Pa</span>
					</view>
					<view class="item-time">2025.01.05  15:06:05</view>
				</view>
				<view class="item">
					<view class="item-l">
						<span class="num">320</span>
						<span class="unit">Pa</span>
					</view>
					<view class="item-time">2025.01.05  15:06:05</view>
				</view>
			</view>
			<view class="content">
				<view class="echart" id="echartId"></view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
			}
		},
		onLoad() {

		},
		onReady() {
			this.getEchart();	
		},
		methods: {
			getEchart(){
				let echartId = document.getElementById('echartId')
				let  echart = echarts.init(echartId);
				let option = {
					title: {
					  text: '压力曲线图'
					},
					tooltip: {
						trigger: 'axis',
						show: true,
					},
					xAxis: {
					  data: ["15:00","15:10","15:20","15:30","15:40","15:50"]
					},
					yAxis: {},
					series: [{
					  name: '销量',
					  type: 'line',
					  data: [5, 20, 36, 10, 10, 20]
					}]
				}
				echart.setOption(option);
			},
		}
	}
</script>

<style scoped>
	.list{
		padding-top: 30rpx;
	}
	.item{
		padding: 0 30rpx;
		height: 88rpx;
		display: flex;
		align-items: center;
		border-bottom: 1px solid #f0f0f0;
		background-color: #fff;
	}
	.item:last-child{
		border-bottom: none;
	}
	.item-l{
		flex: 1;
	}
	.num{
		font-size: 39rpx;
	}
	.unit{
		margin-left: 20rpx;
		font-size: 25rpx;
	}
	.item-time{
		flex-shrink: 0;
		margin-left: 30rpx;
		font-size: 24rpx;
		color: #333;
	}
	.content{
		position: relative;
		margin-top: 30rpx;
		padding: 0 30rpx;
	}
	.echart{
		box-sizing: border-box;
		padding: 42rpx 20rpx 0;
		width: 100%;
		height: 638rpx;
		background-color: #fff;
	}
</style>